<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <!--<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>-->
    <!--不需要写static-->
    <script src="js/jquery.js"></script>
    <script>
        $(function(){

            $(".btn1").on("click",function(){
                $.ajax({
                    type: "GET",
                    url : "http://localhost:9999/hello",
                    success: function(msg){
                        console.log(msg);
                    },
                    error: function(){
                        alert('error');
                    }
                });
            });

        });
    </script>

</head>
<body>
<div>
    <button class="btn1">跨域请求</button>

</div>
</body>
</html>